<!--商品列表-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>商品列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.css" media="all">
    <script src="/front/script/jquery.min.js" charset="utf-8"></script>
    <script src="/bootstrap/js/bootstrap.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item">
                <button class="layui-btn" id="add_commodity_id">添加商品</button>
                <div class="layui-inline">
                    <input class="layui-input layui-input-search" id="commodity-name" placeholder="输入要搜索的商品名字">
                </div>
                <button class="layui-btn " id="search_by_name">搜索</button>
            </div>
        </div>
        <div class="layui-card-body">
            <table class="layui-hide" id="test" lay-filter="test"></table>
        </div>
    </div>
</div>
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">添加商品</h4>
            </div>
            <div class="modal-body">

                <form class="layui-form" id="form1" action="" onsubmit="return false" enctype="multipart/form-data">

                    <div class="layui-form-item">
                        <label class="layui-form-label">商品名称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="commodityName" lay-verify="required" placeholder="请输入"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品原价</label>
                        <div class="layui-input-inline">
                            <input type="text" name="originalPrice" placeholder="请输入"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">活动特价</label>
                        <div class="layui-input-inline">
                            <input type="text" name="activityPrice" placeholder="请输入"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">预付定金</label>
                        <div class="layui-input-inline">
                            <input type="text" name="depositMoney" placeholder="请输入"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">单位</label>
                        <div class="layui-input-inline">
                            <input type="text" name="danwei" placeholder="请输入" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商品标签</label>
                        <div class="layui-input-inline">
                            <input type="text" name="label" lay-verify="required" placeholder="请输入" autocomplete="off"
                                   class="layui-input">
                        </div>
                        <label class="layui-form-label">(请使用|分隔)</label>
                    </div>
                    <div class="layui-form-item layui-hide">
                        <label class="layui-form-label ">商品风格</label>
                        <div class="layui-input-inline">
                            <select name="commodityStyleId" lay-filter="commodityStyleId" id="commodityStyleId"
                            >
                                <option value=""></option>
                                <!--         <option value="1">审核中</option>
                                         <option value="2">已发放</option>
                                         <option value="3">已撤销</option>-->
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item layui-hide">
                        <label class="layui-form-label">商品种类</label>
                        <div class="layui-input-inline">
                            <select name="commodityCategoryId" lay-filter="commodityCategoryId" id="commodityCategoryId"
                            >
                                <option value=""></option>
                                <!--   <option value="1">审核中</option>
                                   <option value="2">已发放</option>
                                   <option value="3">已撤销</option>-->
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">活动说明</label>
                        <div class="layui-input-inline">
                            <textarea placeholder="请输入内容" class="layui-textarea" lay-verify="required"
                                      name="activityDescription" style="width:500px"></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">产品详情</label>
                        <div class="layui-input-inline" style="width:600px;">
                            <textarea id="productDetails" name="productDetails" style="display: none;"></textarea>
                        </div>
                    </div>
                    <input type="hidden" name="telphone">
                    <input type="hidden" name="id">
                    <input type="hidden" name="flag">

                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button class="layui-btn" lay-submit="" lay-filter="demo1">提交更改</button>
                    </div>

                </form>

            </div>

        </div>
    </div>
</div>


<!-- 模态框（Modal） -->
<div class="modal fade" id="myModalImg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="addCommodityImg">添加商品图片</h4>
            </div>
            <div class="modal-body">
                <table class="layui-hide" id="commodityImg" lay-filter="commodityImg"></table>
                <div class="layui-upload">
                    <button type="button" class="layui-btn layui-btn-normal" id="testList">选择多文件</button>
                    <div class="layui-upload-list">
                        <table class="layui-table">
                            <thead>
                            <tr>
                                <th>文件名</th>
                                <th>大小</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="demoList"></tbody>
                        </table>
                    </div>
                    <button type="button" class="layui-btn" id="testListAction">开始上传</button>
                </div>

            </div>

        </div>
    </div>
</div>
<!--模态框结束-->


<script type="text/html" id="toolbarDemo">
    <div class="layui-input-inline">
        <button class="layui-btn layui-btn-sm" lay-event="addYongjin">添加商品</button>
        <div class="layui-input-inline">
            <input class="layui-input-block" id="com-name" placeholder="输入要搜索的商品名字">
            <button class="layui-btn" lay-event="search_by_name">搜索</button>
        </div>
    </div>
</script>

<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="addImg">添加图片</a>
    <a class="layui-btn layui-btn-xs" lay-event="edit">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>


<script type="text/html" id="barDemoImg">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delImg">删除图片</a>
</script>

<script type="text/html" id="sexTpl">
    <img src="{{d.commodityImgUrl}}" style="width:200px;height:100px"/>
</script>

<script src="/layui/layui.js" charset="utf-8"></script>
<script src="/custom/javascript/commodity/commodity.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
</body>
</html>